var UserInfo = require("userinfo");
var Toast = require("toast");

cc.Class({
    extends: cc.Component,

    properties: {
        loading: false,                 //是否加载资源
    },
    
    myuserinfo: null,               //储存本机用户信息
    
    roomdata: null,                 //储存房间信息

    onLoad: function () {
        this.onPause();
        this.myuserinfo = new UserInfo();
        Toast.loadPrefab();
        cc.game.addPersistRootNode(this.node);
    },
    
    onPause: function () {
        cc.game.on(cc.game.EVENT_HIDE, function () {
            cc.audioEngine.pauseAll();
        });
        cc.game.on(cc.game.EVENT_SHOW, function () {
            cc.audioEngine.resumeAll();
        });    
    },
});
